﻿<local:DocumentBase x:Class="WPFExcelReport.SETUPEXPROC"
                    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                    xmlns:local="clr-namespace:ReflectionStudio.Components.UserControls;assembly=ReflectionStudio.Core"
                    xmlns:db="clr-namespace:KA41HLT"
                    xmlns:ucd="clr-namespace:ReflectionStudio.Controls;assembly=ReflectionStudio.Controls"
                    Title="加工流程费用初始化"  
                    HorizontalAlignment="Stretch"
                    Loaded="Window_Loaded"
                    VerticalAlignment="Stretch"
                    Height="400"
                    >
    <local:DocumentBase.Resources>
        <ucd:Divideby10  x:Key="d10"/>
        <ucd:Divideby100  x:Key="d100"/>
        <ucd:Divideby1000  x:Key="d1000"/>
        <ucd:GB2312Convert8859P1  x:Key="gb2312"/>
        <ucd:String2ColorConverter  x:Key="str2color"/>
        <db:SETKA41HLT x:Key="dataSource" />
        <CollectionViewSource x:Key="vwPRODCOST" Source="{Binding Path=PRODCOST, Source={StaticResource dataSource}}" />
    </local:DocumentBase.Resources>
    <Grid>
        <StackPanel>
            <TabControl>
            <TabItem Header="外加工费用维护">
                <Grid>
                    <Grid.RowDefinitions>
                        <RowDefinition Height="60" Name="gdexr1"></RowDefinition>
                        <RowDefinition Height="1*" Name="gdexr2"></RowDefinition>
                    </Grid.RowDefinitions>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="200"  Name="gdexc1"></ColumnDefinition>
                        <ColumnDefinition Width="1*" Name="gdexc2"></ColumnDefinition>
                    </Grid.ColumnDefinitions>
                    <WrapPanel Grid.Column="0" Grid.Row="0" Grid.ColumnSpan="2">
                        <Button    Height="34" Margin="0,0,0,0"  Name="btnExLoad" Width="34" Click="btnExLoad_Click" >
                            <Button.Background>
                                <ImageBrush ImageSource="/IntexReportClient;component/Images/Reload.png" />
                            </Button.Background>
                        </Button>
                        <Button    Height="34" Margin="0,0,0,0"  Name="btnExpSave" Width="34" Click="btnExpSave_Click" >
                            <Button.Background>
                                <ImageBrush ImageSource="/IntexReportClient;component/Images/Save.png" />
                            </Button.Background>
                        </Button>
                        <TextBlock Name="txtEXProcess" Width="80" Background="White"></TextBlock>
                        <Button    Height="34" Margin="0,0,0,0"  Name="btnExpQuery" Width="34" Click="btnExpQuery_Click" >
                            <Button.Background>
                                <ImageBrush ImageSource="/IntexReportClient;component/Images/Find.png" />
                            </Button.Background>
                        </Button>
                    </WrapPanel>
                    <StackPanel Grid.Column="0" Grid.Row="1">
                        <TextBlock Width="Auto" Background="Yellow">加工类型：</TextBlock>
                        <TextBlock Width="Auto" Background="Yellow">WV织造</TextBlock>
                        <TextBlock Width="Auto" Background="Yellow">FN后整理</TextBlock>
                        <TextBlock Width="Auto" Background="Yellow">MM磨毛</TextBlock>
                    </StackPanel>
                    <DataGrid Grid.Column="1" Grid.Row="1"   
                          ItemsSource="{Binding Source={StaticResource vwPRODCOST}}"
                          RowDetailsVisibilityMode="VisibleWhenSelected" 
                          AutoGenerateColumns="False" 
                          Height="Auto" 
                          Width="Auto"
                          HorizontalScrollBarVisibility="Auto"
                          VerticalScrollBarVisibility="Auto"
                          MaxHeight="{Binding Path=Height, ElementName=gdexr1}"
                          MaxWidth="{Binding Path=Width, ElementName=gdexc2}"
                          >
                        <DataGrid.Columns>
                            <DataGridTextColumn Binding="{Binding Path=QSUPNAME}" Header="供应商名称" Width="100" />
                            <DataGridTextColumn Binding="{Binding Path=QPROCESS}" Header="加工过程" Width="40" />
                                <DataGridTextColumn Binding="{Binding Path=QFDESCRIPTION}" Header="描述" Width="100" />
                                <DataGridTextColumn Binding="{Binding Path=QCPRICE}" Header="价格" Width="60" />
                            <DataGridTextColumn Binding="{Binding Path=QUOM}" Header="单位" Width="80" />
                        </DataGrid.Columns>
                    </DataGrid>
                </Grid>
            </TabItem>
            </TabControl>
        </StackPanel>
    </Grid>
</local:DocumentBase>
